
# cross compile for windows / wine by default

CXX= i586-mingw32msvc-g++
CC= i586-mingw32msvc-gcc
AR= i586-mingw32msvc-ar
RANLIB= i586-mingw32msvc-ranlib

CXXFLAGS= 
CPPFLAGS=

SRC = main.cpp Bitmap.cpp bmp_io.cpp float3.cpp MemPool.cpp FileHandler.cpp \
	HpiHandler.cpp

OBJ = $(SRC:%.cpp=%.o)
BIN = mapdeconv.exe

all: $(BIN)

$(BIN): $(OBJ)
	$(CXX) $(CPPFLAGS) -I. $(CXXFLAGS) -o $(BIN) $(OBJ)

%.o : %.cpp
	$(CXX) $(CPPFLAGS) -I. $(CXXFLAGS) -o$@ -c $<

win: 
	$(MAKE) all

linux:
	$(MAKE) all BIN=mapdeconv CXX=g++ CC=gcc AR=ar RANLIB=ranlib

clean:
	rm -f $(OBJ) $(BIN) mapdeconv


